{extend name="book" /}
{block name="title"}
<title>我的</title>
{/block}

{block name="content"}
<div class="middle-one">
<div class="middle-one-top">
    <img src="/html/img/xinshu.png" alt="">
</div>
  <ul class="ul-list-book">
      {foreach name="$new_list" item="v"}
      <li>
          <a href="{:url('index/detail',['id' => $v.id])}">
          <img src="{$v.thumb_url}" alt="">
          </a>
          <p class="book-title">{$v.title}</p>
          <p class="book-man">{$v.author} 著</p>
      </li>
      {/foreach}
  </ul>
</div>

<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default sq-foot am-no-layout" id="">
    <ul class="am-navbar-nav am-cf am-avg-sm-4">
        <li>
            <a href="/" class="curr">
                <span><img src="/html/img/q2.png"/></span>
            </a>
        </li>
        <li>
            <a href="{:url('index/zuji')}" class="">
                <span><img src="/html/img/w1.png"/></span>
            </a>
        </li>
        <li>
            <a href="{:url('index/shuku')}" class="">
                <span><img src="/html/img/e1.png"/></span>
            </a>
        </li>
    </ul>
</div>

{/block}
{block name="js"}
<script>
    $(function () {
        $(".book-man").each(function () {
            var maxwidth = 10;
            if ($(this).text().length = maxwidth) {
                var b = $(this).children().is("a");
                if (b) {
                    $(this).children().text($(this).children().text().substring(0, maxwidth) + "...");
                } else {
                    $(this).text($(this).text().substring(0, maxwidth));
                    $(this).text($(this).text() + "...");
                }
            }
        });
    });
</script>
{/block}

{/block}